package exercise.examples.eg3;

import java.util.Scanner;

public class _3_2 {
    public static void main(String[] args) {
        double a=0,x;
        int i=0;
        Scanner sc=new Scanner(System.in);
        System.out.print("Please Enter Values or 0 to exit>>");
        do {
            x=sc.nextDouble();
            i++;
            a+=Math.pow(x,2);
        }while(x!=0 && a<1.0e8);
        System.out.println("got "+i+" numbers");
        System.out.println("result>>"+a);
    }
}
